Required bean name is "IV1" and the ISR name is "OnInterrupt".
(1) In the following example, program waits at least for 50 interrupt events:
Note: "__interrupt" is a target specific macro for the interrupt service routine.
MAIN.C
unsigned int IntCnt=0;
__interrupt void OnInterrupt(void)
{
IntCnt++; /* Increment counter */
}
void main(void)
{
/* Wait for 50 events */
while (IntCnt < 50);
}
For more about typical usage of the bean code please refer to the page Bean Code Typical Usage.